package com.songtech.auth.util;

import java.util.ArrayList;
import java.util.List;

/**
 * 状态公用变量
 * @author denggang
 *
 */
public class CommState {
	/**
	 * 有效
	 */
	public static int EFFECTIVE = 1;
	/**
	 * 无效
	 */
	public static int INVALID = 0;
	/**
	 * 已删除
	 */
	public static int ISDELETE = -1;
	/**
	 * 资源类型：按钮
	 */
	public static String RESBUTTON = "button";
	/**
	 * 资源类型：菜单
	 */
	public static String RESMENU = "menu";
	/**
	 * 资源菜单标识
	 */
	public static String CODEPREFIX_MENU = "M";
	
	/**
	 * 返回所有的资源类型
	 * @return
	 */
	public static List<String> getResourceType(){
		List<String> list = new ArrayList<>();
		list.add(CommState.RESMENU);
		list.add(CommState.RESBUTTON);
		return list;
	}
	
	/**
	 * 返回所有的资源状态
	 * @return
	 */
	public static List<ResourceState> getResourceState(){
		List<ResourceState> list = new ArrayList<>();
		list.add(new ResourceState("启用", CommState.EFFECTIVE));
		list.add(new ResourceState("停用", CommState.INVALID));
		return list;
	}
}
